<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习</title>
    <script>
        let arr = ["来抓我呀","抓不到吧","急不急","气死你","我又溜了","你好菜啊"];
        let index = 1;
        function f1() {
            let btn = document.getElementById("btn");
            btn.style.left = Math.random() * 1780 + "px";
            btn.style.top = Math.random() * 850 + "px";
            btn.value = arr[index++ % arr.length];
        }
    </script>
</head>
<body>
<!--
    当鼠标悬停在按钮上的时候,按钮会随机跑到当前页面的任意位置
    且按钮的内容会发生改变,其内容依次改为:来抓我呀、抓不到吧、急不急、气死你、我又溜了、你好菜啊
-->
<input onmouseover="f1()" type="button" value="来抓我呀" id="btn" style="position: relative;left: 100px;top: 100px;">
</body>
</html>